import {getFontToken} from '@/api/mixin';
import {Toast} from 'vant';
const state = {
  FontToken:'',
  GridDefaultColor:'#1989fa',
  GridList:[
    {
      path:'img2font',
      title:'文字识别',
      icon:'font',
      badge:'',
      color:'#1989fa'
    },
    {
      path:'news',
      title:'今日头条',
      icon:'hot',
      badge:'',
      color:'#1989fa'
    },
    {
      path:'map',
      title:'地图',
      icon:'location',
      badge:'',
      color:'#1989fa'
    },
    {
      path:'echarts',
      title:'echarts',
      icon:'comment',
      badge:'',
      color:'#1989fa'
    }
  ]
}

const actions = {
  getFontToken({state}){
    getFontToken().then(data=>{
      state.FontToken = data.data;
    }).catch(err=>{
      Toast.fail(err);
      state.FontToken = '';
    })
  }
}

const mutations={

}

export default{
  namespaced: true,
  state,
  mutations,
  actions
}